package com.example.hdx.controller;


import com.example.hdx.entity.ScenicSpots;
import com.example.hdx.mapper.ScenicSpotsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/ScenicSpots")
public class ScenicSpotsController {

    @Autowired
    ScenicSpotsMapper scenicSpotsMapper;

    @GetMapping("")
    public List<ScenicSpots> getAllScenicSpots() {
        List<ScenicSpots>  ScenicSpots=  scenicSpotsMapper.getAllScenicSpots();
        return ScenicSpots;
    }
}
